import numpy as np
import numpy.random as rd
import matplotlib.pyplot as plot
import ipywidgets as widgets

def get_dies(n,points_count):
    dies_sum=np.zeros(points_count,dtype=np.int32)
    for i in range(n):
        dies=rd.randint(1,7,points_count)
        dies_sum=dies_sum+dies
    return dies_sum

def calc_count(x):
    numbers=np.unique(x)
    numbers_count=dict()
    for number in numbers:
        numbers_count[number]=x[x==number].size
    return numbers_count

def draw(numbers_count):
    x=[k for k,v in numbers_count.items()]
    y=[v for k,v in numbers_count.items()]
    plot.bar(x,y)
    plot.show()

sum=get_dies(4,10000)
count=calc_count(sum)
draw(count)